Declarative Logic Programming

Seminar, Project

In declarative logic programming, we don't describe how a result is computed. Instead, we specify logical rules that the result has to satisfy, and it is the computer's job to figure out how to compute the result. For example, the set of paths in a graph can be defined recursively as follows:

In the logic programming language Datalog, this could be expressed as follows: path(A, B) :- edge(A, B). path(A, C) :- edge(A, B), path(B, C).

Note that we just translated our informal description. The result of this program (which is called the fixed point) can be computed by applying the two rules iteratively. In the path program, this means first computing all paths of length one, then two, etc.

In the seminar, you will look at:

You will also write a small program that either

In the project, you will implement a compiler for Datalog or a similar language.

References